home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************\
- * *
- * video.c -- things on the video menu *
- * *
- \**********************************************************************/
-
- #include "defs.h"
-
- /**********************************************************************\
- * *
- * about_modes -- information about video modes *
- * *
- \**********************************************************************/
-
- int about_modes()
- {
- static char *string[] = {
- "Video Modes",
- "Fastgraph supports 28 video modes, including 16-",
- "and 256-color SVGA modes up to 1024x768. The",
- "SVGA modes are implemented through an integrated",
- "kernel, which provides the option of using fast",
- "chipset-specific code or the VESA BIOS. Fastgraph's",
- "SVGA kernel automatically detects over two dozen",
- "distinct chipsets so you can concentrate on your",
- "application and let Fastgraph handle the complexities",
- "of supporting different SVGA chipsets.",
- "",
- "Fastgraph also offers four 256-color \"Mode X\"",
- "resolutions, which are especially popular for game",
- "development.",
- "",
- "FGDEMO is running in a 640x350x16 graphics mode."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(110,530,60,string,16);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * auto_detect -- what modes are available on your machine? *
- * *
- \**********************************************************************/
-
- int auto_detect()
- {
- static char *description[] =
- {
- "an EGA/VGA",
- "a VESA-compatible SVGA",
- "an Ahead A",
- "an Ahead B",
- "an ATI 18800",
- "an ATI 18800-1",
- "an ATI 28800/38800/68800/88800",
- "a Chips & Technologies 82c451/455/456",
- "a Chips & Technologies 82c452",
- "a Chips & Technologies 82c453",
- "a Genoa 6000 series",
- "an Oak OTI-067",
- "a Paradise PVGA1a",
- "a Paradise WD90C00/WD90C10",
- "a Paradise WD90C11/30/31/33",
- "a Trident 8800",
- "a Trident 8900/9000",
- "a Tseng ET3000",
- "a Tseng ET4000",
- "a Video7",
- "a Cirrus Logic 5400 series",
- "an S3",
- "an NCR 77C22/77C32",
- "an Oak OTI-077",
- "an Oak OTI-087",
- " ",
- "a Cirrus Logic 6400 series",
- "an Avance Logic 2000 series"
- };
-
- static char *chipset_info[] =
- {
- "Autodetect",
- "Fastgraph finds a Chips & Technologies 82c451/455/456",
- "chipset with 1024 kilobytes video memory."
- };
-
- register int i;
-
- i = fg_svgainit(0);
- sprintf(chipset_info[1],"Fastgraph finds %s",description[i]);
- sprintf(chipset_info[2],"chipset with %d kilobytes video memory.",fg_memory());
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(112,528,60,chipset_info,3);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * coordinates -- information about coordinate systems *
- * *
- \**********************************************************************/
-
- int coordinates()
- {
- static char *string[] = {
- "Coordinate Systems",
- "Fastgraph supports four coordinate systems: screen",
- "space, viewports, world space, and character space.",
- "",
- "Screen space uses the pixel resolution of the current",
- "video mode. Viewports let you assign an integer-based",
- "coordinate system to a rectangular subset of the screen.",
- "World space is a programmer-defined floating point",
- "coordinate system, while character space is defined in",
- "text-size rows and columns. You can use these different",
- "systems interchangably in your Fastgraph programs."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(90,550,60,string,11);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * logical_pages -- information about logical pages *
- * *
- \**********************************************************************/
-
- int logical_pages()
- {
- static char *string[] = {
- "Logical Pages",
- "Logical pages let you swap out the contents of a",
- "physical or virtual page to conventional memory,",
- "expanded memory (EMS), or extended memory (XMS)",
- "and then swap it back in when you need it. Logical",
- "pages are available in all video modes."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(100,540,60,string,6);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * physical_pages -- information about physical pages *
- * *
- \**********************************************************************/
-
- int physical_pages()
- {
- static char *string[] = {
- "Physical Pages",
- "Physical pages are useful for fast image display",
- "and animation. The number of physical pages",
- "available is dependent on the video mode and the",
- "amount of memory on your video card."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(120,520,60,string,5);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * virtual_buffers -- information about virtual buffers *
- * *
- \**********************************************************************/
-
- int virtual_buffers()
- {
- static char *string[] = {
- "Virtual Buffers",
- "Virtual buffers are blocks of conventional memory",
- "that you can treat as video memory. They are much",
- "more general than virtual pages, as they are supported",
- "in all graphics video modes and can be smaller or",
- "larger than the actual page size."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(100,540,60,string,6);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }
-
- /**********************************************************************\
- * *
- * virtual_pages -- information about virtual pages *
- * *
- \**********************************************************************/
-
- int virtual_pages()
- {
- static char *string[] = {
- "Virtual Pages",
- "If you don't have enough memory on your video card",
- "for physical pages, Fastgraph will let you use RAM to",
- "create virtual pages in some video modes."
- };
-
- /* clear the screen and display the info window */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
- info_window(100,540,60,string,4);
-
- /* wait for keystroke or mouse button */
-
- fg_mousevis(ON);
- wait_for_keystroke();
-
- /* clear the screen and return to the menu */
-
- fg_mousevis(OFF);
- fg_restore(0,xlimit,menu_bottom,ylimit);
-
- fg_mousevis(ON);
- redraw = TRUE;
-
- return(OK);
- }